{% extends 'base.html' %}
{% block nei %}

            <div class="cl-artical-content">
                <h2 class="cl-artical-title">{{ article.title }}</h2>
                <div class="cl-card-tag">
                    <div><span>{{ articlies.total_views }}</span>人浏览 / <span>{{ articlies.comments_count }}</span>人评论 <span>{{ articlies.create_time }}</span></div>
                </div>
                <div class="cl-artical">
                    <p>{{ articlies.tags }}
                    </p>
                    <p>作者:{{ articlies.author.username }}</p>
                    <p><img src="{{ articlies.avatar.url }}" alt=""></p>
                    <p>
                        {#safe反转码#}
                    {{ articlies.content | safe }}
                    </p>

                </div>


            </div>


        <div class="recommend-panel">
            <h4 class="right-card-title">相关文章</h4>
            <div class="card-deck">

                {% for i in list %}
                    <div class="card ll-panel">
                        <a class="recommend-panel-link" href="?art_id={{ i.id }}">
                            <div class="recommend-panel-top" >
                                <img src="{{ i.avatar.url }}" class="img-fluid" alt="" class="img_max1">
                                <h4 style="color: #2b91af"> 标题：{{ i.title }}</h4>
                            </div>
                        </a>
                    </div>
                {% endfor %}

            </div>
        </div>

            <div class="comment">


                <form class="cl-comment-from" method="post">
                    {% csrf_token %}
                    <input type="hidden" name="art_id" value="{{ articlies.id }}">
                    <div><textarea placeholder="说点什么吧..." rows="1" name="content"></textarea></div>
                    <button type="submit">留言</button>
                    <span class="clearfix"></span>
                </form>

                <h4 class="right-card-title">全部评论</h4>
                    <div class="row">
                {% for comment in comments %}
                <div class="col-12" >
                            <hr><p><strong style="color: pink"></strong></p>
                            <div>
                                <div><span><strong>{{ comment.user.username }}</strong></span>&nbsp;<span style="color: gray">{{ comment.created|date:'Y-m-d H:i' }}</span></div>
                                <br>
                                <p>{{ comment.content|safe }}</p>
                            </div>
                </div>
                {% endfor %}
                <div class="pagenation" style="text-align: center">
                    <div id="pagination" class="page"></div>
                </div>
            </div>

            </div>

{% endblock %}

